package com.javasm.domin.entity.goodsEntity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.javasm.domin.entity.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @TableName gd_product
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("gd_product")
public class GdProduct implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    /**
     * 产品id
     */
    private Integer id;

    /**
     * 档案编码
     */
    private Integer goodsId;

    /**
     * 类型
     */
    private Integer typeId;

    /**
     * 品牌
     */
    private Integer brandId;

    /**
     * 颜色
     */
    private Integer colourId;

    /**
     * 商品型号
     */
    private String modelId;

    /**
     * 0个人采购，1集团采购
     */
    private String basicsPurchase;

    /**
     * 0非铺货  1铺货
     */
    private String basicsDistribution;

    /**
     * 0非备机  1备机
     */
    private String basicsStandbyMachine;

    /**
     *
     */
    private String createBy;

    /**
     *
     */
    private Date createTime;

    /**
     *
     */
    private String updateBy;

    /**
     *
     */
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        GdProduct other = (GdProduct) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))
            && (this.getTypeId() == null ? other.getTypeId() == null : this.getTypeId().equals(other.getTypeId()))
            && (this.getBrandId() == null ? other.getBrandId() == null : this.getBrandId().equals(other.getBrandId()))
            && (this.getColourId() == null ? other.getColourId() == null : this.getColourId().equals(other.getColourId()))
            && (this.getModelId() == null ? other.getModelId() == null : this.getModelId().equals(other.getModelId()))
            && (this.getBasicsPurchase() == null ? other.getBasicsPurchase() == null : this.getBasicsPurchase().equals(other.getBasicsPurchase()))
            && (this.getBasicsDistribution() == null ? other.getBasicsDistribution() == null : this.getBasicsDistribution().equals(other.getBasicsDistribution()))
            && (this.getBasicsStandbyMachine() == null ? other.getBasicsStandbyMachine() == null : this.getBasicsStandbyMachine().equals(other.getBasicsStandbyMachine()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
        result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode());
        result = prime * result + ((getBrandId() == null) ? 0 : getBrandId().hashCode());
        result = prime * result + ((getColourId() == null) ? 0 : getColourId().hashCode());
        result = prime * result + ((getModelId() == null) ? 0 : getModelId().hashCode());
        result = prime * result + ((getBasicsPurchase() == null) ? 0 : getBasicsPurchase().hashCode());
        result = prime * result + ((getBasicsDistribution() == null) ? 0 : getBasicsDistribution().hashCode());
        result = prime * result + ((getBasicsStandbyMachine() == null) ? 0 : getBasicsStandbyMachine().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", goodsId=").append(goodsId);
        sb.append(", typeId=").append(typeId);
        sb.append(", brandId=").append(brandId);
        sb.append(", colourId=").append(colourId);
        sb.append(", modelId=").append(modelId);
        sb.append(", basicsPurchase=").append(basicsPurchase);
        sb.append(", basicsDistribution=").append(basicsDistribution);
        sb.append(", basicsStandbyMachine=").append(basicsStandbyMachine);
        sb.append(", createBy=").append(createBy);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
